#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <QUdpSocket>
#include <QNetworkDatagram>



QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACE

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();

private slots:
    void on_pushButton_clicked();
    void processResponse();

private:
    Ui::Widget *ui;

    QUdpSocket* socket;

    //定义两个常量来描述服务区的 IP 和 PORT
    const QString SERVER_IP = "127.0.0.1";
    const quint16 SERVER_PORT = 9090;
};
#endif // WIDGET_H
